/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package regras;

import Interfaces.CheckerRule;

/**
 *
 * @author Tainá, Ana Luiza e Amanda
 */
public class RuleSymbols01 implements CheckerRule{
    public String password;

    public RuleSymbols01(String password) {
        this.password = password;
    }
    
    @Override
    public int rule(){
        int total = 0;
        String senha = " "+password+" ";
        int symbol = senha.split("(?=[!@#$%^&*?_~])").length - 1;
        if (symbol==1)
            total += 5;
        
        if (symbol >= 2)
            total +=10;
        
        return total;
    }
}
